#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
double poly(int n, double x)
{
	if (n == 0) return 1;
	if (n == 1) return x;
	else return ((2 * n - 1) * x * poly(n - 1, x) - (n - 1) * poly(n - 2, x)) / n;
}
int main()
{
	int n;
	double x;
	scanf("%d%lf", &n, &x);
	double ans = poly(n, x);
	printf("%lf", ans);
	return 0;
}